import Vue from "vue";
import Vuex from 'vuex';
import actions from './actions'
import mutations from './mutations';
Vue.use(Vuex)

const state = {
  cartList:[]
}
const store = new Vuex.Store({
  state,
  mutations: mutations,
  actions: actions,
  getters: {
    getCarLength(state) {
      return state.cartList.length;
    },
    cartList(state) {
      return state.cartList;
    }
  }
})

export default store